package com.zonski.jbots.desktop.client.entity;

import java.awt.Graphics;
import java.awt.Color;

import com.zonski.jbots.engine.Entity;
import com.zonski.jbots.engine.Rectangle;

import com.zonski.jbots.desktop.client.EntityRenderer;

public class BoundsEntityRenderer implements EntityRenderer
{
    public static final BoundsEntityRenderer INSTANCE = new BoundsEntityRenderer(Color.green);

    private Color color;

    public BoundsEntityRenderer(Color color)
    {
        this.color = color;
    }

    public void render(Graphics g, Entity entity)
    {
        g.setColor(this.color);
        Rectangle r = entity.bounds;
        g.drawRect(r.x, r.y, r.width-1, r.height-1);
    }
}
